home *** CD-ROM | disk | FTP | other *** search
/ Freelog Special Edition 10 / FreelogHS10.iso / Buzz / Buzz_Advanced_Pack.exe / {app} / Dev / Mdk / mdk.h < prev    next >
C/C++ Source or Header  |  2001-08-27  |  2KB  |  64 lines

  1. // Copyright (C) 2000 Oskari Tammelin (ot@iki.fi)
  2. // This header file and the library may be used to write _freeware_ DLL "machines" for Buzz
  3. // Using it for anything else is not allowed without a permission from the author
  4.      
  5. #ifndef __BUZZ_MDK
  6. #define __BUZZ_MDK
  7.  
  8. #ifndef __MACHINE_INTERFACE_H
  9. #include "MachineInterface.h"
  10. #endif
  11.  
  12.  
  13. class CMDKImplementation;
  14. class CMDKMachineInterfaceEx;
  15.  
  16. class CMDKMachineInterface : public CMachineInterface
  17. {
  18. public:
  19.     virtual ~CMDKMachineInterface();
  20.     virtual void Init(CMachineDataInput * const pi);
  21.     virtual bool Work(float *psamples, int numsamples, int const mode);
  22.     virtual bool WorkMonoToStereo(float *pin, float *pout, int numsamples, int const mode);
  23.  
  24.     virtual void Save(CMachineDataOutput * const po);
  25.  
  26. public:
  27.     void SetOutputMode(bool stereo);
  28.  
  29. public:
  30.     virtual CMDKMachineInterfaceEx *GetEx() = 0;
  31.     virtual void OutputModeChanged(bool stereo) = 0;
  32.  
  33.     virtual bool MDKWork(float *psamples, int numsamples, int const mode) = 0;
  34.     virtual bool MDKWorkStereo(float *psamples, int numsamples, int const mode) = 0;
  35.  
  36.     virtual void MDKInit(CMachineDataInput * const pi) = 0;
  37.     virtual void MDKSave(CMachineDataOutput * const po) = 0;
  38.  
  39.  
  40. private:
  41.     CMDKImplementation *pImp;
  42.  
  43. };
  44.  
  45. class CMDKMachineInterfaceEx : public CMachineInterfaceEx
  46. {
  47. public:
  48.     friend class CMDKMachineInterface;
  49.  
  50.     virtual void AddInput(char const *macname, bool stereo);    // called when input is added to a machine
  51.     virtual void DeleteInput(char const *macename);            
  52.     virtual void RenameInput(char const *macoldname, char const *macnewname);            
  53.  
  54.     virtual void Input(float *psamples, int numsamples, float amp); // if MIX_DOES_INPUT_MIXING
  55.  
  56.  
  57.     virtual void SetInputChannels(char const *macname, bool stereo);
  58.  
  59. private:
  60.     CMDKImplementation *pImp;
  61. };
  62.  
  63.  
  64. #endif